package com.allen.Utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JdbcUtils {
    private static String url = "jdbc:mysql://localhost:3306/erp";
    private static String user = "root";
    private static String password = "547547";
    private static Connection conn = null;
    private static String classforname = "com.mysql.jdbc.Driver";

    public static Connection getConnect() {
        try {
            Class.forName(classforname);
            conn = DriverManager.getConnection(url, user, password);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return conn;
    }
}
// TODO: 2017/8/28  
// TODO: 2017/8/28  